# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-backports.functools_lru_cache
_pkgname=backports.functools_lru_cache
pkgver=1.6.4
pkgrel=3
pkgdesc='Backport of functools.lru_cache.'
url='https://pypi.org/project/backports.functools_lru_cache/#files'
arch=('any')
license=('MIT')
depends=('python2' 'python2-backports')
makedepends=('python2-setuptools' 'python2-pip' 'python2-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('dab746440aeff8a411438f26f5c9a863929c41139c83bcfae51dcf29650c8e9d394b53a5f03b4e31ab7abd6a57249d719f155672e5585efb5f1851c8fe0a3de5')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm "$pkgdir/usr/lib/python2.7/site-packages/backports/__init__.py"*
}

